<html>
    <body>
        <h1>Mapear Banco de dados</h1>
        <form method="POST" action="maping.php">
            Tabela: <select name="table" type="text">
                <?php
                require_once 'DataSet.php';
                $ds = new DataSet();
                $ds->sqlClear();

                $sql = "SELECT     distinct trim(RRF.RDB\$RELATION_NAME) AS TABELA

                        FROM        RDB\$RELATION_FIELDS   RRF

                        WHERE       RRF.RDB\$RELATION_NAME NOT STARTING WITH 'RDB$'  and RRF.RDB\$RELATION_NAME NOT STARTING WITH 'MON$'
                        ORDER BY    RRF.RDB\$RELATION_NAME ";

                $ds->sqlAdd($sql);

                $query = $ds->exec_sql($sql);
                while ($result = ibase_fetch_row($query)) {
                    echo '<option>'.$result[0].'</option>';
                    $ds->next();
                }
                ?>

            </select>
            <br>
            Objeto: <input name="object" type="text"/>
            <input name="enviar" type="submit" value="Continuar"/>
        </form>
    </body>
</html>
